/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.com.intesal.compra.sql;

/**
 *
 * @author JM
 */
public class SQLMunicipio {

    public static final String INSERT = "INSERT INTO municipio(id_d, nombre_mu) VALUES (?, ?)";
    public static final String MODIFICAR = "UPDATE municipio SET id_d=?, nombre_mu=? WHERE id_mu=?";
    public static final String ListaMunicipio = "SELECT p.id_p, d.nombre_d, p.nombre_p, d.id_d, m.id_mu, m.nombre_mu FROM departamento As d, municipio As m, pais As p WHERE d.id_d = m.id_d AND  p.id_p = d.id_p";
    public static final String DepartamenoPorPais = "SELECT d.nombre_d, d.id_d FROM pais As p, departamento AS d WHERE p.id_p = d.id_p AND p.id_p=?";

    public static final String getMunicipio_x_Departamento="SELECT p.id_p,d.id_d,mu.id_mu,p.nombre_p,d.nombre_d,mu.nombre_mu FROM PAIS as p,DEPARTAMENTO as d,MUNICIPIO as mu where p.id_p=d.id_p and d.id_d=mu.id_d and d.id_d=? order by p.nombre_p,d.nombre_d,mu.nombre_mu";

}
